{% extends 'base.html' %}
{% load helpers %}
{% load registry %}
{% load ui_framework %}

{% block breadcrumbs_wrapper %}{% render_breadcrumbs %}{% endblock %}

{% block header %}
    {{ block.super }}
    {% if new_release %}
        {# new_release is set only if the current user is a superuser or staff member #}
        <div class="alert alert-info text-center" role="alert">
            <span class="mdi mdi-information-outline"></span>
            A new release is available: <a href="{{ new_release.url }}">Nautobot v{{ new_release.version }}</a> |
            <a href="https://docs.nautobot.com/projects/core/en/v{{ new_release.version }}/installation/upgrading/">Upgrade instructions</a>
        </div>
    {% endif %}
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-lg-6">
            <div class="card">
                <div class="card-header">
                    <strong>About</strong>
                </div>
                <div class="card-body">
                    <a href="https://networktocode.com/nautobot/">Nautobot</a> is a product of <a href="https://networktocode.com/">Network to Code</a>. Nautobot is a Network Source of Truth and Network Automation Platform. Nautobot has an extensive ecosystem of solutions that can be installed to provide and power Network Automation feature sets. Please check the <a href="{% url 'apps:apps_marketplace' %}">App Marketplace</a> to learn more.
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="card">
                <div class="card-header">
                    <strong>Support</strong>
                </div>
                <table class="table table-hover card-body attr-table">
                    <tr>
                        <td>Support Contract Status</td>
                        <td>{{ support_contract_active | render_boolean }}</td>
                    </tr>
                    <tr>
                        <td>Contract Expiry Date</td>
                        <td>
                            {% if support_contract_active %}
                                {{ support_expiration_date | date }}
                            {% elif support_expiration_date %}
                                <span style="color: red;">{{ support_expiration_date | date }}</span>
                            {% else %}
                                &mdash;
                            {% endif %}
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            {% if not support_expiration_date %}
                                To inquire about Nautobot support with Network to Code, please email <a href="mailto:info@networktocode.com">info@networktocode.com</a>.
                            {% else %}
                                If there is any question on the status of your Nautobot support contract with Network to Code, please email <a href="mailto:info@networktocode.com">info@networktocode.com</a>.
                            {% endif %}
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
{% endblock %}
